//------------------------------------------------------------------------------
// <copyright file="Base64Encoder.cpp" company="Microsoft">
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// </copyright>
//------------------------------------------------------------------------------

#include "stdafx.h"

#include "Base64Encoder.h"
#include "Utils.h"

using namespace Microsoft::Internal::GamesTest::Rpc::Server::Encoding::Base64;

std::wstring Base64Encoder::Encode(const unsigned __int8* buffer, unsigned int bufferLength)
{
	return Utils::BufferToBase64String(buffer, bufferLength);
}

std::shared_ptr<unsigned __int8> Base64Encoder::Decode(const wchar_t* base64String, unsigned int stringLength, unsigned int& outBufferLength)
{
	return Utils::Base64StringToBuffer(base64String, stringLength, outBufferLength);
}